package cn.cdqf.coupon.dispatch.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@Slf4j
public class RestTemplateController {
    @Autowired
    private RestTemplate restTemplate;
    @GetMapping("restTemplate")
    public String restTemplate(){

        String forObject = restTemplate.getForObject("http://KJXZ-MANAGER/restTemplate", String.class);
        return forObject;
    }

}
